package sort;

import java.util.Arrays;

/**
 * @author chengz
 * @description 希尔排序
 * @create 2020-11-19 14:46
 */
public class ShellSort implements ISortAlgorithm {
    public static void main(String[] args) {
        int [] arr = {5,1,2,6,7,8,4,9,0};
        new QuickSort().sort(arr);
        Arrays.stream(arr).forEach(System.out::println);
    }

    @Override
    public String getName() {
        return "希尔排序";
    }
    @Override
    public void sort(int[] arr) {
        shellSort(arr);
    }

    private void shellSort(int[] arr) {
        // 每次更新
    }


    private void swap(int[] arr, int index1, int index2) {
        if (index1 == index2) {
            return;
        }
        int temp = arr[index1];
        arr[index1] = arr[index2];
        arr[index2] = temp;
    }
}
